CC=g++
CFLAG=-g -I include/
RM=rm -rf
OBJ=build/course_management.o build/student_info_management.o build/main.o build/read_data.o

run:course_management.o student_info_management.o main.o read_data.o
	$(CC) -o run $(CFLAG) $(OBJ)

main.o:main.cpp include/course_management.h include/course.h include/read_data.h
	$(CC) -c -o ./build/main.o $(CFLAG) main.cpp

read_data.o:src/read_data.cpp include/read_data.h include/course_management.h include/course.h include/log.h
	$(CC) -c -o ./build/read_data.o $(CFLAG) src/read_data.cpp

course_management.o:src/course_management.cpp include/course_management.h include/course.h include/log.h
	$(CC) -c -o ./build/course_management.o $(CFLAG) src/course_management.cpp

student_info_management.o:src/student_info_management.cpp include/student.h include/student_info_management.h include/log.h
	$(CC) -c -o ./build/student_info_management.o $(CFLAG) src/student_info_management.cpp

.PHONY:clean 

clean:
	$(RM) ./build ./run&&mkdir build
